package pixelwaks.ctrl;

import java.util.HashMap;
import java.util.Map;

import pixelwaks.ctrl.impl.ExplosionCtrl;
import pixelwaks.ctrl.impl.MenuCtrl;
import pixelwaks.ctrl.impl.ModeCtrl;
import pixelwaks.ctrl.impl.PlayerCtrl;
import pixelwaks.ctrl.impl.ProjectileCtrl;
import pixelwaks.ctrl.impl.SceneryCtrl;
import pixelwaks.ctrl.impl.SettingsCtrl;
import pixelwaks.ctrl.impl.ShootCtrl;
import pixelwaks.ctrl.impl.SplashCtrl;
import pixelwaks.ctrl.impl.WeaponCtrl;
import pixelwaks.ctrl.impl.WindCtrl;

import common.ctrl.IObserver;

public final class ControlFactory {
	
	public final static String MENU_CTRL = "menu";
	public final static String LIFEBAR_CTRL = "lifebar";
	public final static String PLAYER_CTRL = "player";
	public final static String PROJECTILE_CTRL = "projectile";
	public final static String EXPLOSION_CTRL = "explosion";
	public final static String SHOOT_CTRL = "shoot";
	public final static String SETTINGS_CTRL = "settings";
	public final static String SPLASH_CTRL = "splash";
	public final static String WEAPON_CTRL = "weapon";
	public final static String WIND_CTRL = "wind";
	public final static String SCENERY_CTRL = "scenery";
	public final static String MODE_CTRL = "mode";
	
	//private static Map<String, Action> map = new HashMap<String, Action>();
	private static Map<String, IObserver> obs = new HashMap<String, IObserver>();
    static { 
    	obs.put(SCENERY_CTRL, new SceneryCtrl());
    	obs.put(WEAPON_CTRL, new WeaponCtrl());
    	obs.put(EXPLOSION_CTRL, new ExplosionCtrl());
        obs.put(MENU_CTRL, new MenuCtrl());
        //obs.put(LIFEBAR_CTRL, new LifeBarCtrl());
        obs.put(PLAYER_CTRL, new PlayerCtrl());
        obs.put(PROJECTILE_CTRL, new ProjectileCtrl());
        
        obs.put(SHOOT_CTRL, new ShootCtrl());
        obs.put(MODE_CTRL, new ModeCtrl());
        obs.put(SETTINGS_CTRL, new SettingsCtrl());
        obs.put(SPLASH_CTRL, new SplashCtrl());
        obs.put(WIND_CTRL, new WindCtrl());
    }
    
	public static IObserver getObserver(String name) {
		return obs.get(name);
	}
}